import request from '@/utils/request.js'

// 登录
export const loginAPI = data => {
  return request({
    url: '/sys/login',
    method: 'POST',
    data
  })
}

// 获取当前登录的用户信息
export const getUserProfileAPI = () => {
  return request({
    url: '/sys/profile',
    method: 'POST',
  })
}

// 获取当前登录的头像
export const getUserPhotoAPI = (id) => {
  return request({
    url: `/sys/user/${id}`,
    method: 'GET',
  })
}
